package com.maxmlr.music.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author max
 * @version 1.0
 * @ClassName Dict
 * @Description 字典表
 * @Copyright Copyright (c) 2020: www.maxmlr.com.
 * @since 2020-06-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_dict")
@ApiModel(value="Dict对象", description="字典表")
public class Dict extends Model<Dict> {

    private static final long serialVersionUID=1L;

    /**
     * 编号
     */
    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父级编号
     */
    @ApiModelProperty(value = "父级编号")
    @TableField("parent_id")
    private Integer parentId;

    /**
     * 标签名
     */
    @ApiModelProperty(value = "标签名")
    @TableField("name")
    private String name;

    /**
     * 数据值
     */
    @ApiModelProperty(value = "数据值")
    @TableField("value")
    private String value;

    /**
     * 类型
     */
    @ApiModelProperty(value = "类型")
    @TableField("type")
    private String type;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    @TableField("description")
    private String description;

    /**
     * 排序（升序）
     */
    @ApiModelProperty(value = "排序（升序）")
    @TableField("order_num")
    private Integer orderNum;

    /**
     * 备注信息
     */
    @ApiModelProperty(value = "备注信息")
    @TableField("remarks")
    private String remarks;

    /**
     * 删除标记
     */
    @ApiModelProperty(value = "删除标记")
    @TableField("del_flag")
    private String delFlag;

    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    @TableField("create_user_id")
    private Integer createUserId;

    /**
     * 更新者
     */
    @ApiModelProperty(value = "更新者")
    @TableField("update_user_id")
    private Integer updateUserId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
